import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

/* 引入 ElementUI */
import ElEMENT from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

/* 引入 less */
import '@/assets/global.less'

/* 引入 vue-quill-editor 富文本编辑器 */
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

/* 引入dayjs */
import dayjs from 'dayjs'
// 基于dayjs封装全局函数来格式化时间
Vue.prototype.$formatDate = (dateObj) => {
  return dayjs(dateObj).format('YYYY-MM-DD HH:mm:ss')
}

Vue.use(ElEMENT)
Vue.use(VueQuillEditor)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')
